import java.util.Scanner;

/**
 * 考试题目和要点：
 * 1、中文大写金额数字前应标明“人民币”字样。中文大写金额数字应用壹、贰、叁、肆、伍、陆、柒、捌、玖、拾、佰、仟、万、亿、元、角、分、零、整等字样填写。
 * 2、中文大写金额数字到“元”为止的，在“元”之后，应写“整字，如532.00应写成“人民币伍佰叁拾贰元整”。在”角“和”分“后面不写”整字。
 * 3、阿拉伯数字中间有“0”时，中文大写要写“零”字，阿拉伯数字中间连续有几个“0”时，中文大写金额中间只写一个“零”字，如6007.14，应写成“人民币陆仟零柒元壹角肆分“。
 * 4、10应写作“拾”，100应写作“壹佰”。例如，1010.00应写作“人民币壹仟零拾元整”，110.00应写作“人民币壹佰拾元整”
 * 5、十万以上的数字接千不用加“零”，例如，30105000.00应写作“人民币叁仟零拾万伍仟元整”
 */
public class Rmb {
    static char[] bigNum = {'零','壹','贰','叁','肆','伍','陆','柒','捌','玖'};
    static char[] unit = {' ','拾','佰','仟'};
    static char[] unit2 = {'元','万','亿'};
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String numStr = scanner.nextLine();
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("人民币");
            String[] nums = numStr.split("\\.");

            stringBuilder.append(convertBig(nums[0]));
            stringBuilder.append(convertSmall(nums[1]));

            System.out.println(stringBuilder);

        }
    }

    /**
     *
     * @param small
     * @return
     */
    private static String convertSmall(String small) {
        if(small.equals("00")){
            return "整";
        }
        if(small.length() == 2){
            int J = Character.getNumericValue(small.charAt(0));
            int F = Character.getNumericValue(small.charAt(1));
            if(J != 0 && F == 0){
                return bigNum[J]+"角";
            }else if(J == 0 && F != 0){
                return bigNum[F]+"分";
            }else {
                return bigNum[J]+"角"+bigNum[F]+"分";
            }
        }
        return "";
    }

    /**
     *
     * @param big
     * @return
     */
    private static String convertBig(String big) {
        if(big.equals("0")) return "";
        String res = "";
        int index = 0;
        while (big.length() > 0){
            String temp = big.length() > 4 ?big.substring(big.length() - 4) : big;
            res = readNum(temp)+unit2[index++]+res;
            big = big.length() > 4?big.substring(0,big.length() - 4) : "";
        }
        return res;
    }

    private static String readNum(String temp) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < temp.length(); i++) {
            int u = temp.length() - 1 - i;
            int b = Character.getNumericValue(temp.charAt(i));

            if(b == 0 && i+1<temp.length() && temp.charAt(i+1) == '0'){
                continue;
            }
            if(!(b==1 && i+1 < temp.length() && u==1)){
                sb.append(bigNum[b]);
            }
            if(b !=0){
                sb.append(unit[u]);
            }
        }
        String ResultNum = sb.toString().trim();
        if(ResultNum.charAt(ResultNum.length() -1) == '零'){
            ResultNum = ResultNum.substring(0,ResultNum.length() -1);
        }
        return ResultNum;
    }

}
